$(function(){
    var id = getvl("id");
    if (id != '') {
        $.ajax({
            url: urlcore + "/api/webDailisubmit/webDailisubmitDetails?webDailisubmitId="+id,
            type: "get",
            dataType: 'json',
            contentType: "application/json;charset=utf-8",
            success:function(data){
                if (data.success == true) {
                    var da = data.data;
                    $('#id').text(da.id);
                    $('#reqDatetime').text(da.reqDatetime);
                    $('#reqCity').text(da.reqCity);
                    $('#realName').text(da.realName);
                    $('#phone').text(da.phone);
                    $('#email').text(da.email);
                    $('#companyName').text(da.companyName);
                    $('#companyAddress').text(da.companyAddress);
                    $('#elmShop').text(da.elmShop);
                    $('#mtShop').text(da.mtShop);
                    $('#bdShop').text(da.bdShop);
                    $('#elmOrder').text(da.elmOrder);
                    $('#mtOrder').text(da.mtOrder);
                    $('#bdOrder').text(da.bdOrder); 
                    $('#elmRide').text(da.elmRide);
                    $('#mtRide').text(da.mtRide);
                    $('#bdRide').text(da.bdRide);
                    $('#localSource').text(da.localSource);
                    $('#teamPlan').text(da.teamPlan);
                    $('#thenPlan').text(da.thenPlan);
                } else if (data.code == 'OVERTIME'){
                    var thisUrl = window.location.href;
                    if (thisUrl.indexOf('login.html') <= -1) {
                        top.window.location.href="login.html";
                    }
                } else {
                    alert(data.msg);
                }
            },
            error:function() {
                /* Act on the event */
                alert("error");
            }
        });
    }

});
